import os

names = os.listdir('/data/wangqian/dataset/voc0712/VOCdevkit/VOC0712/JPEGImages')
with open('trainval.txt', 'w') as f:
    for name in names:
        f.writelines(name.rsplit('.', 1)[0]+'\n')
        